<template>
	<view class="center">
		<navigator @click="gotoarrow" class="return-arrow">
			<image class="return-img" src="../../static/arrow.png"></image>
		</navigator>
		<div class="head-portrait">
				<img :src="admin_img" alt="头像">
				<div class="nane-content">我是 
				     <text class="nane">{{admin_name}}</text><br />
                      我为<text class="ami">阿米日记</text>代言
				</div>
			</div>
			<div class="logo-img">
				<img width="100%" :src="logo_img" alt="logo">
			</div>	
 			<div class="qr-code">
				<tki-qrcode v-if="ifShow" ref="qrcode" :val="url_share" :size="size" :unit="unit" :background="background" :foreground="foreground" :pdground="pdground" :icon="icon" :iconSize="iconsize" :lv="lv" :onval="onval" :loadMake="loadMake" :usingComponents="true" /> 
			</div> 		
	</view>
</template>

<script>
	import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue"
	export default {
		data() {
			return {
				ifShow: false,
				url_share:'http://armindiary.mashizai.com/wechat/oauthAmi?admin_code='+uni.getStorageSync('admin_code')+'&admin_name='+uni.getStorageSync('admin_name')+'&shop_id='+uni.getStorageSync('shop_id'),
				size: 280, // 二维码大小
				unit: 'upx', // 单位
				background: '#fff', // 背景色
				foreground: '#000', // 前景色
				pdground: '#000', // 角标色
				icon: '', // 二维码图标
				iconsize: 40, // 二维码图标大小
				lv: 3, // 二维码容错级别 ， 一般不用设置，默认就行
				onval: false, // val值变化时自动重新生成二维码
				loadMake: true, // 组件加载完成后自动生成二维码
				src: '', // 二维码生成后的图片地址或base64
				admin_img:uni.getStorageSync('admin_img'),
				logo_img:"/adminApp/static/work_member/logo.png",
				admin_name:uni.getStorageSync('admin_name')
				
			}
		},components: {		
			tkiQrcode
		},
		onLoad: function(event) {
			this.ifShow=true;
			var scKey=uni.getStorageSync("member_id");
		},
		methods:{
			gotoarrow(){
				this.$router.go(-1)
			}
		}
	}
</script>

<style>
.center{	background: #f8f8f8;}

	.content{
		width: 100%;
	}
	.head-portrait{
		margin: 10px;
	}
	.head-portrait img{
		float: left;width: 30%;
	}
	.logo-img{background:#f8f8f8;}
	.logo-img img{
		margin: 8px 0;
		
	}
	.nane-content{
		float: left;
		font-size: 25px;
		margin-left: 10px;
		    width: 65%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.nane{
		font-size: 20px;
	    color: #6d1c79;
	}
	.ami{
		color: #6d1c79;
	}
	.qr-code{
		width: 100%;
		height: 800upx;
		    padding-top: 40px;
        text-align: center;
		background: url(../../static/work_member/footer.png) no-repeat;
		background-size: 100% auto;
	}
	
	.back_ucenter{width: 120px; clear: both; }
</style>
